package com.erbao.dp.factory.abs;

import com.erbao.dp.factory.Moveable;
import com.erbao.dp.factory.Plan;

/**
 * @author CaoBaoYin
 * @since 2021/8/24 21:14
 */
public class Main {

    public static void main(String[] args) {
       /* Car c = new Car();
        c.go();
        AK47 ak47 = new AK47();
        ak47.shoot();
        Bread bread = new Bread();
        bread.printName();*///产品一族，现代人，魔法人
        AbstractFactory af = new ModernFactory();// 产品组只需修改new这里
        Vehicle vehicle = af.createVehicle();
        vehicle.go();
        Food food = af.createFood();
        food.printName();
        Weapon weapon = af.createWeapon();
        weapon.shoot();
    }
}
